package com.cloud.message.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * IM消息记录
 *
 * @author yzj
 * @since 2024-01-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "SysImMessage对象", description = "IM消息记录")
@TableName("sys_im_message")
public class SysImMessage extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "接收人ID")
    private Long receiveId;

    @Schema(description = "发送人ID")
    private Long sendId;

    @Schema(description = "发送时间")
    private Date sendTime;

    @Schema(description = "消息内容")
    private String content;

    @Schema(description = "聊天组ID")
    private Long groupId;

    @Schema(description = "消息类型")
    private String messageType;

    @Schema(description = "删除标志（0代表存在 1代表删除）")
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    private Integer deleted;

    @Schema(description = "备注")
    private String remark;

}
